<template>
  <div id="newsCenter">
    <component v-for="(item,idx) in dataList" v-bind:is="item" :key="idx"></component>
    <hr>
    <swiper @jump='ev_index' :carousePicData="imgList" :imgText="imgText"></swiper>
  </div>
</template>
<script>

import inpNum from './compon/inpNum.vue'
import imagesLoop from './compon/imagesLoop.vue'
import textBox from './compon/textBox.vue'
import swiper from '../../components/swiper/index.vue'

export default {
  data() {
    return {
      imgList:[
        {imgUrl:'https://dpic.tiankong.com/9h/wh/QJ6140784948.jpg'},
        {imgUrl:'https://dpic.tiankong.com/ik/eb/QJ6207269418.jpg'}
      ],
      dataList:[
        'textBox',
        'inpNum',
        'imagesLoop',
      ],
    };
  },
  props:{
    imgText:{
      type:String
    }
  },
  components: {
    inpNum,
    imagesLoop,
    textBox,
    swiper
  },
  methods:{
      ev_index(data){
        this.$emit('swiperData',data)
        

      }
  }
};
</script>
<style lang="less" scoped>
*{
  font-size: .5rem;
}
</style>
